package com.poh.service.impl;

import com.poh.mapper.ChoiceQuestionMapper;
import com.poh.pojo.ChoiceQuestion;
import com.poh.service.ChoiceQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChoiceQuestionServiceImpl implements ChoiceQuestionService {
    @Autowired
    ChoiceQuestionMapper choiceQuestionMapper;
    @Override
    public int addChoiceQuestion(ChoiceQuestion choiceQuestion) {

        return choiceQuestionMapper.addChoiceQuestion(choiceQuestion);
    }

    @Override
    public List<ChoiceQuestion> getChoiceQuestionByQuestionBankId(String questionBankId) {
        return choiceQuestionMapper.getChoiceQuestionByQuestionBankId(questionBankId);
    }



    @Override
    public int delectChoiceQuestionByCqId(int cqId) {
        return choiceQuestionMapper.delectChoiceQuestionByCqId(cqId);
    }

    @Override
    public int updateChoiceQuestionById(ChoiceQuestion choiceQuestion) {
        return choiceQuestionMapper.updateChoiceQuestionById(choiceQuestion);
    }

    @Override
    public ChoiceQuestion queryChoiceQuestionById(int cqId) {
        return choiceQuestionMapper.queryChoiceQuestionById(cqId);
    }
}
